import request from '@/utils/request'

// 查询库存冻结列表
export function listFreeze(query) {
  return request({
    url: '/storehouse/freeze/list',
    method: 'get',
    params: query
  })
}

// 查询库存冻结详细
export function getFreeze(id) {
  return request({
    url: '/storehouse/freeze/' + id,
    method: 'get'
  })
}

// 新增库存冻结
export function addFreeze(data) {
  return request({
    url: '/storehouse/freeze',
    method: 'post',
    data: data
  })
}

// 修改库存冻结
export function updateFreeze(data) {
  return request({
    url: '/storehouse/freeze',
    method: 'put',
    data: data
  })
}

// 删除库存冻结
export function delFreeze(id) {
  return request({
    url: '/storehouse/freeze/' + id,
    method: 'delete'
  })
}

// 激活库存冻结
export function activationFreeze(id) {
  return request({
    url: '/storehouse/freeze/activation/' + id,
    method: 'post'
  })
}

// 取消激活库存冻结
export function removeActivationFreeze(id) {
  return request({
    url: '/storehouse/freeze/removeActivation/' + id,
    method: 'post'
  })
}
